package cn.com.code.generator.entity;

import cn.com.do1.dsf.common.validator.group.AddGroup;
import cn.com.do1.dsf.common.validator.group.UpdateGroup;
import cn.com.do1.dsf.compont.mysql.annotation.EncryptHandle;
import cn.com.do1.dsf.compont.mysql.annotation.SecurityData;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * 
 *
 * @author nick
 * @email sunlightcs@gmail.com
 * @date 2021-05-02 13:03:03
 */
@TableName("tb_user")
@ApiModel(description = "")
@Data
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
    @ApiModelProperty(value = "ID", example = "1000001")
    @TableId
    private String id;
	/**
	 * 
	 */
    @ApiModelProperty(value = "", example = "测试001")
    @Length(message="不能超过32个字符", max = 32, groups = {AddGroup.class ,  UpdateGroup.class})
	@SecurityData
    private String name;
	/**
	 * 
	 */
    @ApiModelProperty(value = "", example = "1")
	@EncryptHandle
    private Integer age;
}
